#include "CommandWindows.h"

ImageEditorCropWindow::ImageEditorCropWindow( wxWindow* parent, int max_width, int max_height )
:
CropWindow( parent )
{
	x_->SetValue(0);
	x_->SetRange(0, max_width);

	y_->SetValue(0);
	y_->SetRange(0, max_height);

	width_->SetRange(0, max_width);
	width_->SetValue(max_width);

	height_->SetRange(0, max_height);
	height_->SetValue(max_height);
}

const int ImageEditorCropWindow::get_x() const {
	return x_->GetValue();
}

const int ImageEditorCropWindow::get_y() const {
	return y_->GetValue();
}
const int ImageEditorCropWindow::get_width() const {
	return width_->GetValue();
}

const int ImageEditorCropWindow::get_height() const {
	return height_->GetValue();
}

ImageEditorMoveWindow::ImageEditorMoveWindow(wxWindow* parent, int x_init, int y_init, int max_width, int max_height ) : MoveWindow(parent) {
	x_offset_->SetRange(-max_width, max_width);
	x_offset_->SetValue(x_init);
	y_offset_->SetRange(-max_height, max_height);
	y_offset_->SetValue(y_init);
}